import client.blogger.*;

import junit.framework.TestCase;
import java.io.IOException;

import com.google.gdata.client.GoogleService;
import com.google.gdata.util.ServiceException;

// try to import the Class you are going to test
// import client.blogger.Blogger;

// jUnit expects ALL tests to begin with the name "test"
// otherwise they won't run ( their convention, not mine ).

public class BloggerTest extends TestCase
{

    // construct a subclass  
    public BloggerTest( String name ) {
        super( name );
    }

    Blogger b;
    GoogleService gs;
    private String user = "mrd.test.tube@gmail.com";
    private String pass = "testing123";

    protected void setUp() throws IOException {
        b  = new Blogger();
        gs = new GoogleService("blogger", "testing blogger");
        try {
            gs.setUserCredentials( user, pass );
        }
        catch ( ServiceException se ) {
            //
        }
    }

    public void testSomething() {
        assertEquals( (1 + 1), 2 );
    }
// 
//     public void testGetBlogId() {
//         try {
//             b.getBlogId( gs );
//         }
//         catch ( ServiceException se ) {
//             fail( "should return blogID" );
//         }
//     }

    protected void tearDown() {
        b  = null;
        gs = null;
    }

}

